#include <bits/stdc++.h>
using namespace std;
int n, m, v, x, y, a[10];
long long ans;
void dfs(int stp) {
    if (stp == n + 1) {
        int tmp = 0;
        for (int i = 1; i < n; i++) {
            (tmp ^= ((a[i] * a[i+1]) & v));
        }
        ans += tmp;
    } else {
        if (stp == x) {
            a[stp] = y;
            dfs(stp + 1);
        } else {
            for (int i = 0; i <= v; i++) {
                a[stp] = i;
                dfs(stp + 1);
            }
        }
    }
}
int main() {
    freopen("pearl.in", "r", stdin);
    freopen("pearl.out", "w", stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);
    cin >> n >> m >> x;
    v = (1 << m) - 1;
    string str;
    cin >> str;
    for (int i = 0; i < m; i++) {
        if (str[i] == '1') {
            (y |= (1 << i));
        }
    }
    dfs(1);
    cout << ans % 1000000007 << endl;
    return 0;
}